package com.idroid.domain;

import org.osmdroid.util.GeoPoint;
import org.osmdroid.views.overlay.OverlayItem;

public class User extends OverlayItem {

	private User(double lat, double lon) {
		super("User", "User", "User's Location", new GeoPoint(
				(int) ((double) lat * (double) 1E6),
				(int) ((double) lon * (double) 1E6)));

	}

	public float getLatitude() {
		return (float) ((float) mGeoPoint.getLatitudeE6() / (float) 1E6);
	}

	public float getLongitude() {
		return (float) ((float) mGeoPoint.getLongitudeE6() / (float) 1E6);

	}

	public String getSymbol() {
		return "usericon";
	}

	public static synchronized User newUser(double lat, double lon) {

		return new User(lat, lon);
	}

	@Override
	public String toString() {
		return "User [getLatitude()=" + getLatitude() + ", getLongitude()="
				+ getLongitude() + "]";
	}

}
